﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using DataAnnotationsExtensions;

namespace DomainModel
{
    public class Ind : EntityBase
    {
        public int IndID { get; set; }
        public int LoginID { get; set; }

        [Required]
        [NoHtml]
        [Display(Name = "Title")]
        [StringLength(30, ErrorMessage = "The Title field has maximum 30 characters")]
        public string Title { get; set; }

        [Required]
        [NoHtml]
        [Display(Name = "First name")]
        [StringLength(20, ErrorMessage = "The First name field has maximum 20 characters")]
        public string FirstName { get; set; }

        [Required]
        [NoHtml]
        [Display(Name = "Last name")]
        [StringLength(20, ErrorMessage = "The Last name field has maximum 20 characters")]
        public string LastName { get; set; }

        [NoHtml]
        [Display(Name = "Bio")]
        [StringLength(200, ErrorMessage = "The Bio field has maximum 200 characters")]
        public string Bio { get; set; }

        [Required]
        [NoHtml]
        [Display(Name = "Location")]
        [StringLength(30, ErrorMessage = "The Location field has maximum 30 characters")]
        public string Location { get; set; }

        [Url]
        [Display(Name = "Website")]
        [StringLength(256, ErrorMessage = "The Website field has maximum 256 characters")]
        public string PersonalUrl { get; set; }

        [Display(Name="Twitter")]
        [NoHtml]
        [TwitterUserName]
        public string Twitter { get; set; }
        public string LinkedInUrl { get; set; }
        public string FacebookUrl { get; set; }
        public string Resume { get; set; }
        public DateTime CreateDate { get; set; }
        public DateTime ModifiedDate { get; set; }
        public DateTime SavedDate { get; set; } //for saved list

        public Boolean AvailableForHire { get; set; }
        public Boolean HasAvatar { get; set; }
        public string AvatarFileExtension { get; set; }

        //count stats
        public int ShotCount { get; set; }
        public int ShotTagCount { get; set; }
        public int LikeCount { get; set; }
        public int FollowerCount { get; set; }
        public int FollowingCount { get; set; }

        //relation
        public List<JobType> JobTypeList { get; set; }
        public List<Skill> SKillList { get; set; }
        //
        public List<Shot> ShotList { get; set; }

        //
        public int TotalCount { get; set; }
        //extend property
        public string FullName
        {
            get {
                return FirstName + " " + LastName;
            }
        }
    }
}
